<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<script src="D:/大学/大三上/H5移动开发/lib/easeljs-0.7.1.min.js"></script>
<body onload="init()">
	<canvas id="mycanvas" width="800px" height="800px" style="border: 1px solid #ccc"></canvas>
</body>
</html>

<script type="text/javascript">
	var stage;
	function init() {
		stage = new createjs.Stage(document.getElementById("mycanvas"));
		createjs.Ticker.addEventListener("tick",handleTick);
		createjs.Ticker.setFPS(60);
		start()
	}

	function handleTick() {
		stage.update();
	}

	function start() {
		drawButterflies();

	}

	function drawButterflies() {
		var imgPath = "butterfly.png";
		//biemap 静态图片
		butterfly1 = new createjs.Bitmap(imgPath);
		butterfly2 = new createjs.Bitmap(imgPath);
		butterfly3 = new createjs.Bitmap(imgPath);
		butterfly2.x = 200;
		butterfly3.x = 400;
		stage.addChild(butterfly1,butterfly2,butterfly3);
		stage.update();
		setTimeout(moveButterflies,1000)
	}

	function moveButterflies() {
		butterfly2.y += 200;
	}
</script>